package com.fingard.dsp.bank.sepro;

import java.util.Date;

import com.fingard.constant.Format;
import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.transaction.Req7516HisTrans;
import com.fingard.dsp.bank.reqrespobj.transaction.RetAtsTrans;
import com.fingard.dsp.bankset.BankFront;
import com.fingard.dsp.tcpserver.RequestNIO;
import com.fingard.util.TransIDHelper;
import com.fingard.xml.XmlTextReader;

/**历史明细查询调用增强版--按日调用，本地按日缓存*/
public class TransactionPro {
	private static TransIDHelper _idHelper = new TransIDHelper(1, 999);
	/**返回HHmmss+3位*/
	public static String getTransID(){
		return Format.Time6Format.format(new Date())+_idHelper.getNextIDStr();
	}
	
	private RequestNIO bizO;
	private BankFront bankFront;
	private ReqRespHeader reqHeader;
	public TransactionPro(RequestNIO pBizO, BankFront pBankFront, ReqRespHeader pReqHeader){
		bizO = pBizO;
		bankFront = pBankFront;
		reqHeader = pReqHeader;
	}
	
	public RetAtsTrans qryByEachDay(String pClassName, XmlTextReader xmlReader) throws Exception{
		Req7516HisTrans tmpReq7516 = new Req7516HisTrans(xmlReader, reqHeader);
		RetAtsTrans retAts = new RetAtsTrans(tmpReq7516.reqHeader);
		return retAts;
	}
	
}
